<?php
class BlacklistVo extends SzAbstractMySqlVo
{

    private $userId;
    private $lockTime;
    private $reason;

    /**
     * Initialize BlacklistVo.
     *
     * @param $userId
     * @param $lockTime
     * @param $reason
     * @param boolean $isInsert default false, means for now this vo is initialized not for insert process
     * @return BlacklistVo
     */
    public function __construct($userId, $lockTime, $reason, $isInsert = false) {
        $this->userId = $userId;
        $this->lockTime = $lockTime;
        $this->reason = $reason;

        $this->isInsert = $isInsert;
        $this->voClassName = 'BlacklistVo';
        $this->ormName = 'Blacklist';
    }

    /**
     * @see SzAbstractVo::toArray
     */
    public function toArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'lockTime' => $this->getLockTime(),
            'reason' => $this->getReason(),
        );
    }

    /**
     * @see SzAbstractVo::toEntireArray
     */
    public function toEntireArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'lockTime' => $this->getLockTime(),
            'reason' => $this->getReason(),
        );
    }

    /**
     * @see SzAbstractVo::toPureArray
     */
    public function toPureArray()
    {
        return array(
            $this->getUserId(),
            $this->getLockTime(),
            $this->getReason(),
        );
    }

    public function getUserId()
    {
        return $this->userId;
    }

    public function setUserId($val)
    {
        $this->saveColumnStatus(0, $this->userId);
        $this->userId = $val;
    }

    public function getLockTime()
    {
        return $this->lockTime;
    }

    public function setLockTime($val)
    {
        $this->saveColumnStatus(1, $this->lockTime);
        $this->lockTime = $val;
    }

    public function getReason()
    {
        return $this->reason;
    }

    public function setReason($val)
    {
        $this->saveColumnStatus(2, $this->reason);
        $this->reason = $val;
    }

}